/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


var $ = jQuery.noConflict();

function animatepos()
{
    var left = parseInt($('#light-3').position().left);
    var wind = $(window).width();
    var i1 = 0; var i2 = 0;
    if(wind <= 1366)
    {
        if(wind >= 1280)
        {
            i1 = 200;
            i2 = 372;
        }else{
            i1 = 170;
            i2 = 330;
        }
        $('#light-1').css('left', left-i2);
        $('#light-2').css('left', left-i1);
        $('#light-4').css('right', left-i1);
        $('#light-5').css('right', left-i2);
    }else{
        $('#light-1').css({'left': '23%', 'top': '7%'});
        $('#light-2').css({'left': '35%', 'top': '11%'});
        $('#light-3').css({'top': '11%'});
        $('#light-4').css({'right': '35%', 'top': '11%'});
        $('#light-5').css({'right': '23%', 'top': '7%'});
    }
}

$(document).ready(function(){
    animatepos();
});

$(window).resize(function(){
    animatepos();
});